package org.xinjiang.data.migration.hainan.controller;

import io.swagger.annotations.Api;
import io.swagger.v3.oas.annotations.Operation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.xinjiang.data.migration.common.response.PageInfo;
import org.xinjiang.data.migration.common.response.Param;
import org.xinjiang.data.migration.common.response.Result;
import org.xinjiang.data.migration.hainan.dto.req.JzdxQueryDTO;
import org.xinjiang.data.migration.hainan.dto.res.JzdxResultDTO;
import org.xinjiang.data.migration.hainan.service.IJzdxService;

/**
 * @Description: 矫正对象
 */
@Api(tags = "矫正对象")
@RestController
@RequestMapping("/hainan/jzdx")
@Slf4j
public class JzdxController {
    @Autowired
    private IJzdxService jzdxService;


    /**
     * 分页列表查询
     *
     * @return
     */
    @Operation(summary = "矫正对象-分页列表查询")
    @PostMapping(value = "/pageList")
    public Result<PageInfo<JzdxResultDTO>> pageList(Param pageable, @Validated @RequestBody JzdxQueryDTO dto) {
        PageInfo<JzdxResultDTO> pageList = jzdxService.pageList(pageable, dto);
        return Result.ok(pageList);
    }
}
